package com.sukaiyi.giteeideaplugin.mainwindow;

import com.intellij.ui.Gray;
import com.intellij.ui.JBColor;

import javax.swing.*;
import java.awt.*;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;

public abstract class ClickableMouseListenerAdapter implements MouseListener {


    @Override
    public void mousePressed(MouseEvent mouseEvent) {

    }

    @Override
    public void mouseReleased(MouseEvent mouseEvent) {

    }

    @Override
    public void mouseEntered(MouseEvent mouseEvent) {
        Object source = mouseEvent.getSource();
        JComponent component = (JComponent) source;
        component.setBackground(Gray._230);
        component.setCursor(new Cursor(Cursor.HAND_CURSOR));
    }

    @Override
    public void mouseExited(MouseEvent mouseEvent) {
        Object source = mouseEvent.getSource();
        JComponent component = (JComponent) source;
        component.setBackground(Gray._242);
        component.setCursor(Cursor.getDefaultCursor());
    }
}
